	<div class="column full fl">
		
	<div class="box themed_box">
	<h2 class="box-header"><?php echo $title; ?></h2>
	<div class="box-content">
    <?php echo $this->session->flashdata('message');?>
	<?php if($title==$this->lang->line('adv_search')): ?>
	<form id="formtest" name="formtest" method="post" action="<?php echo site_url($form['action']); ?>">
    <label><?php echo $this->lang->line('type') ?></label>
	<select name="type_search">
		<option value="">All</option>
		<option value="Training">Training</option>
		<option value="Seminar">Seminar</option>
	</select>
	<label><?php echo $this->lang->line('order') ?></label>
	<select name="order_search">
		<option value="">All</option>
		<option value="First Order">First Order</option>
		<option value="Repeat Order">Repeat Order</option>
	</select>
	<label><?php echo $this->lang->line('incoming') ?></label>
	<select name="incoming_search">
		<option value="">All</option>
		<option value="Incoming">Incoming</option>
		<option value="Non Incoming">Non Incoming</option>
	</select>
    <label><?php echo $this->lang->line('pic'); ?></label>
	<select name="user" >
		<option value="">All</option>
		<?php foreach($table['users'] as $user): ?>
		<option value="<?php echo $user['username']; ?>"><?php echo $user['username'];?></option>
        <?php endforeach;?>
	</select>
			<input id="reset" class="button red" type="button" value="Reset" name="reset" />
			<input id="validate" class="button themed" type="submit" value="<?php echo $this->lang->line('search');?>" name="search" />
           
	</form>
	<br/>
	<?php endif;?>
	<table class="display" id="tabledata">
	<thead>
		<tr>
			<th><?php echo $this->lang->line('no');?></th>
            <?php if($title<>$this->lang->line('app')): ?>
            <?php if( ($title<>$this->lang->line('pb')) ): ?>
            <th><?php echo $this->lang->line('spv');?></th>
            <th><?php echo $this->lang->line('mgr');?></th>
            <th><?php echo $this->lang->line('keu');?></th>
            <?php endif;?>
            <?php endif;?>
            
			<th><?php echo $this->lang->line('job_type');?></th>
            
            <?php if( ($title<>$this->lang->line('pb')) ): ?>
			<th><?php echo $this->lang->line('order_type');?></th>
            <th><?php echo $this->lang->line('customer_name');?></th>
			<th><?php echo $this->lang->line('product_name');?></th>
			<th><?php echo $this->lang->line('invest');?></th>
            <?php endif;?>
            
            <?php if($this->session->userdata('user_pos')<> $access ):?>
            <?php if(($title<>$this->lang->line('pb')) ): ?>
            <th><?php echo $this->lang->line('pic');?></th>
             <?php endif;?>
            <?php endif;?>
            <?php if(($title==$this->lang->line('pb')) ): ?>
            <th>JM</th>
            <th>CD</th>
            <th>PTL</th>
            <th>CI</th>
            <th>KT</th>
            <th>PA</th>
            <th>PM</th>
            <th>PDJ</th>
            <th>PD</th>
            <th>PP</th>
            <th>BTR</th>
            <th>PMS</th>
            <th>LK</th>
            <th>BA1</th>
            <th>BA1</th>
            <th>LK</th>
            <th>LLP</th>
            <th>BA2</th>
            <?php endif;?>
            <?php if( ($title<>$this->lang->line('pb')) ): ?>
			<th>Action</th>
            <?php endif;?>
		</tr>
	</thead>
	<tbody>
	<?php foreach($table['jobs'] as $rec): ?>
		<tr class="gradeX">

			<td><?php echo $rec['no'] ?></td>
            <?php if($title<>$this->lang->line('app')): ?>
            <?php if( ($title<>$this->lang->line('pb')) ): ?>
            <td>
                <?php if($rec['spv']<>0): ?>
                <?php if( ($title<>$this->lang->line('pb')) ): ?>
                <span class="bullet bullet-green"></span>
                <?php endif;?>
                <?php else: ?>
                <span class="bullet bullet-red"></span>
                <?php endif;?>
            </td>
            <td>
                <?php if($rec['mgr']<>0): ?>
                <?php if( ($title<>$this->lang->line('pb')) ): ?>
                <span class="bullet bullet-green"></span>
                <?php endif;?>
                <?php else: ?>
                <span class="bullet bullet-red"></span>
                <?php endif;?>
            </td>
            <td>
                <?php if($rec['keu']<>0): ?>
                <?php if( ($title<>$this->lang->line('pb')) ): ?>
                <span class="bullet bullet-green"></span>
                <?php endif;?>
                <?php else: ?>
                <span class="bullet bullet-red"></span>
                <?php endif;?>
            </td>
            <?php endif;?>
            <?php endif;?>
			<td><?php echo $rec['job_type'] ?></td>
            
            <?php if( ($title<>$this->lang->line('pb')) ): ?>
			<td><?php echo $rec['order_type'] ?></td>
            <td><?php echo $rec['customer_name'] ?></td>
			<td ><?php  echo $rec['product_name'] ?></td>
			<td class="right"><?php  echo number_format($rec['total'],2) ?></td>
            <?php endif ;?>
            
            <?php if($this->session->userdata('user_pos')<> $access ):?>
            <?php if( ($title<>$this->lang->line('pb')) ): ?>
            <td ><?php  echo $rec['pic'] ?></td>
            <?php endif;?>
            <?php endif;?>
            
            <?php if( ($title==$this->lang->line('pb')) ): ?>
            
			<!-- JO -->
            <td>
              <?php if($rec['cd']==0): ?>
                <?php if($rec['jo_mom']==0): ?>
                <?php if ($this->session->userdata('user_group')== $this->config->item('prod')): ?>
                <a href="<?php  echo site_url($this->config->item('job_jm_update').$this->session->userdata('user_group').'/'.$rec['id']); ?>"><span class="bullet bullet-red"></span></a>
                <?php else: ?>
                <span class="bullet bullet-red"></span>    
                <?php endif;?>
                <?php else:?>
                <?php if ($this->session->userdata('user_group')== $this->config->item('prod')): ?>
                <a href="<?php  echo site_url($this->config->item('job_jm_cancel').$this->session->userdata('user_group').'/'.$rec['id']); ?>"><span class="bullet bullet-green"></span></a>
                <?php else: ?>
                <span class="bullet bullet-green"></span>    
                <?php endif;?>
                <?php endif; ?>
              <?php else: ?>
                <span class="bullet bullet-green">
              <?php endif;?>  
            </td>
            <!-- JO -->
			
			<!-- CD -->
            <td>
            <?php if($rec['pl']==0): ?>
            <?php if($rec['jo_mom']<> 0): ?>
                <?php if($rec['cd']==0): ?>
                <?php if ($this->session->userdata('user_group')== $this->config->item('prod')): ?>
                <a href="<?php  echo site_url($this->config->item('job_cd_update').$this->session->userdata('user_group').'/'.$rec['id']); ?>"><span class="bullet bullet-red"></span></a>
                <?php else: ?>
                <span class="bullet bullet-red"></span>    
                <?php endif;?>
                
                <?php else:?>
                <?php if ($this->session->userdata('user_group')== $this->config->item('prod')): ?>
                <a href="<?php  echo site_url($this->config->item('job_cd_cancel').$this->session->userdata('user_group').'/'.$rec['id']); ?>"><span class="bullet bullet-green"></span></a>
                <?php else: ?>
                <span class="bullet bullet-green"></span>    
                <?php endif;?>
                <?php endif; ?>
            <?php else:?>
            <span class="icon_single cancel"></span>     
            <?php endif;?>  
            <?php else:?>
            <span class="bullet bullet-green">
            <?php endif;?>      
            </td>
            
            <td>
                <?php if($rec['ci']==0): ?>
                <?php if($rec['cd']<> 0): ?>
                <?php if($rec['pl']==0): ?>
                <?php if ($this->session->userdata('user_group')== $this->config->item('prod')): ?>
                <a href="<?php  echo site_url($this->config->item('job_pl_update').$this->session->userdata('user_group').'/'.$rec['id']); ?>"><span class="bullet bullet-red"></span></a>
                <?php else: ?>
                <span class="bullet bullet-red"></span>    
                <?php endif;?>
                <?php else:?>
                <?php if ($this->session->userdata('user_group')== $this->config->item('prod')): ?>
                <a href="<?php  echo site_url($this->config->item('job_pl_cancel').$this->session->userdata('user_group').'/'.$rec['id']); ?>"><span class="bullet bullet-green"></span></a>
                <?php else: ?>
                <span class="bullet bullet-green"></span>    
                <?php endif;?>
                <?php endif; ?>
                <?php else:?>
                <span class="icon_single cancel"></span>     
                <?php endif;?>
                <?php else:?>
                <span class="bullet bullet-green">
                <?php endif;?>   
            </td>
            
            <td>
                <?php if($rec['ci_tek']==0): ?>
                <?php if($rec['pl']<> 0): ?>
                <?php if($rec['ci']==0): ?>
                <?php if ($this->session->userdata('user_group')== $this->config->item('prod')): ?>
                <a href="<?php  echo site_url($this->config->item('job_ci_update').$this->session->userdata('user_group').'/'.$rec['id']); ?>"><span class="bullet bullet-red"></span></a>
                <?php else: ?>
                <span class="bullet bullet-red"></span>    
                <?php endif;?>
                <?php else:?>
                <?php if ($this->session->userdata('user_group')== $this->config->item('prod')): ?>
                <a href="<?php  echo site_url($this->config->item('job_ci_cancel').$this->session->userdata('user_group').'/'.$rec['id']); ?>"><span class="bullet bullet-green"></span></a>
                <?php else: ?>
                <span class="bullet bullet-green"></span>    
                <?php endif;?>
                <?php endif; ?>
                <?php else:?>
                <span class="icon_single cancel"></span>     
                <?php endif;?>
                <?php else:?>
                <span class="bullet bullet-green">
                <?php endif;?>    
            </td>
            
            
            <td>
                <?php if($rec['pa']==0): ?>
                <?php if($rec['ci']<> 0): ?>
                <?php if($rec['ci_tek']==0): ?>
                <?php if ($this->session->userdata('user_group')== $this->config->item('prod')): ?>
                <a href="<?php  echo site_url($this->config->item('job_ci_tek_update').$this->session->userdata('user_group').'/'.$rec['id']); ?>"><span class="bullet bullet-red"></span></a>
                <?php else: ?>
                <span class="bullet bullet-red"></span>    
                <?php endif;?>
                <?php else:?>
                <?php if ($this->session->userdata('user_group')== $this->config->item('prod')): ?>
                <a href="<?php  echo site_url($this->config->item('job_ci_tek_cancel').$this->session->userdata('user_group').'/'.$rec['id']); ?>"><span class="bullet bullet-green"></span></a>
                <?php else: ?>
                <span class="bullet bullet-green"></span>    
                <?php endif;?>
                <?php endif; ?>
                <?php else:?>
                <span class="icon_single cancel"></span>     
                <?php endif;?>
                <?php else:?>
                <span class="bullet bullet-green">
                <?php endif;?>   
            </td>
            
            <td>
               <?php if(($rec['pm']==0) || ($rec['pdl']== 0) ) : ?>
                <?php if($rec['ci_tek']<> 0): ?>
                <?php if($rec['pa']==0): ?>
                <?php if ($this->session->userdata('user_group')== $this->config->item('prod')): ?>
                <a href="<?php  echo site_url($this->config->item('job_pa_update').$this->session->userdata('user_group').'/'.$rec['id']); ?>"><span class="bullet bullet-red"></span></a>
                <?php else: ?>
                <span class="bullet bullet-red"></span>    
                <?php endif;?>
                <?php else:?>
                <?php if ($this->session->userdata('user_group')== $this->config->item('prod')): ?>
                <a href="<?php  echo site_url($this->config->item('job_pa_cancel').$this->session->userdata('user_group').'/'.$rec['id']); ?>"><span class="bullet bullet-green"></span></a>
                <?php else: ?>
                <span class="bullet bullet-green"></span>    
                <?php endif;?>
                <?php endif; ?>
                <?php else:?>
                <span class="icon_single cancel"></span>     
                <?php endif;?>
                <?php else:?>
                <span class="bullet bullet-green">
                <?php endif;?> 
            </td>
            
            <td>
            <?php if($rec['job_type']=="Training"):?>
                <?php if($rec['pd']== 0): ?>
                <?php if($rec['pa']<> 0): ?>
                <?php if($rec['pm']==0): ?>
                 <?php if ($this->session->userdata('user_group')== $this->config->item('prod')): ?>
                <a href="<?php  echo site_url($this->config->item('job_pm_update').$this->session->userdata('user_group').'/'.$rec['id']); ?>"><span class="bullet bullet-red"></span></a>
                <?php else: ?>
                <span class="bullet bullet-red"></span>    
                <?php endif;?>
                <?php else:?>
                <?php if ($this->session->userdata('user_group')== $this->config->item('prod')): ?>
                <a href="<?php  echo site_url($this->config->item('job_pm_cancel').$this->session->userdata('user_group').'/'.$rec['id']); ?>"><span class="bullet bullet-green"></span></a>
                <?php else: ?>
                <span class="bullet bullet-green"></span>    
                <?php endif;?>
                <?php endif; ?>
                <?php else:?>
                <span class="icon_single cancel"></span>     
                <?php endif;?>
            <?php else:?>
                <span class="bullet bullet-green">
            <?php endif;?>     
            <?php else: ?>
                 -
            <?php endif;?> 
                
            </td>
            
            <td>
            <?php if($rec['job_type']=="Seminar"):?>
                <?php if($rec['pp']== 0): ?>
                <?php if($rec['pa']<> 0): ?>
                <?php if($rec['pdl']==0): ?>
                <?php if ($this->session->userdata('user_group')== $this->config->item('prod')): ?>
                <a href="<?php  echo site_url($this->config->item('job_pdj_update').$this->session->userdata('user_group').'/'.$rec['id']); ?>"><span class="bullet bullet-red"></span></a>
                <?php else: ?>
                <span class="bullet bullet-red"></span>    
                <?php endif;?>
                <?php else:?>
                <?php if ($this->session->userdata('user_group')== $this->config->item('prod')): ?>
                <a href="<?php  echo site_url($this->config->item('job_pdj_cancel').$this->session->userdata('user_group').'/'.$rec['id']); ?>"><span class="bullet bullet-green"></span></a>
                <?php else: ?>
                <span class="bullet bullet-green"></span>    
                <?php endif;?>
                <?php endif; ?>
                <?php else:?>
                <span class="icon_single cancel"></span>     
                <?php endif;?>
             <?php else:?>
                <span class="bullet bullet-green">
            <?php endif;?>   
             <?php else: ?>
                 <?php if($rec['pp']== 0): ?>
                <?php if($rec['pm']<> 0): ?>
                <?php if($rec['pdl']==0): ?>
                <?php if ($this->session->userdata('user_group')== $this->config->item('prod')): ?>
                <a href="<?php  echo site_url($this->config->item('job_pdj_update').$this->session->userdata('user_group').'/'.$rec['id']); ?>"><span class="bullet bullet-red"></span></a>
                <?php else: ?>
                <span class="bullet bullet-red"></span>    
                <?php endif;?>
                <?php else:?>
                <?php if ($this->session->userdata('user_group')== $this->config->item('prod')): ?>
                <a href="<?php  echo site_url($this->config->item('job_pdj_cancel').$this->session->userdata('user_group').'/'.$rec['id']); ?>"><span class="bullet bullet-green"></span></a>
                <?php else: ?>
                <span class="bullet bullet-green"></span>    
                <?php endif;?>
                <?php endif; ?>
                <?php else:?>
                <span class="icon_single cancel"></span>     
                <?php endif;?>
             <?php else:?>
                <span class="bullet bullet-green">
            <?php endif;?>   
             <?php endif;?>    
            </td>
            <td>
                <?php if($rec['job_type']=="Training"):?>
                <?php if($rec['btr']== 0): ?>
                <?php if(($rec['pm']<> 0) AND ($rec['pdl']<> 0) ): ?>
                <?php if($rec['pd']==0): ?>
                <?php if ($this->session->userdata('user_group')== $this->config->item('prod')): ?>
                <a href="<?php  echo site_url($this->config->item('job_pd_update').$this->session->userdata('user_group').'/'.$rec['id']); ?>"><span class="bullet bullet-red"></span></a>
                <?php else: ?>
                <span class="bullet bullet-red"></span>    
                <?php endif;?>
                <?php else:?>
                <?php if ($this->session->userdata('user_group')== $this->config->item('prod')): ?>
                <a href="<?php  echo site_url($this->config->item('job_pd_cancel').$this->session->userdata('user_group').'/'.$rec['id']); ?>"><span class="bullet bullet-green"></span></a>
                <?php else: ?>
                <span class="bullet bullet-green"></span>    
                <?php endif;?>
                <?php endif; ?>
                <?php else:?>
                <span class="icon_single cancel"></span>     
                <?php endif;?>
             <?php else:?>
                <span class="bullet bullet-green">
            <?php endif;?>      
            <?php else: ?>
                 -
            <?php endif;?>    
            </td>
            <td>
                <?php if($rec['job_type']=="Seminar"):?>
                <?php if($rec['pp']== 0): ?>
                <?php if(($rec['pm']<> 0) AND ($rec['pdl']<> 0) ): ?>
                <?php if($rec['pp']==0): ?>
                <?php if ($this->session->userdata('user_group')== $this->config->item('prod')): ?>
                <a href="<?php  echo site_url($this->config->item('job_pp_update').$this->session->userdata('user_group').'/'.$rec['id']); ?>"><span class="bullet bullet-red"></span></a>
                <?php else: ?>
                <span class="bullet bullet-red"></span>    
                <?php endif;?>
                <?php else:?>
                 <?php if ($this->session->userdata('user_group')== $this->config->item('prod')): ?>
                <a href="<?php  echo site_url($this->config->item('job_pp_cancel').$this->session->userdata('user_group').'/'.$rec['id']); ?>"><span class="bullet bullet-green"></span></a>
                <?php else: ?>
                <span class="bullet bullet-green"></span>    
                <?php endif;?>
                <?php endif; ?>
                <?php else:?>
                <span class="icon_single cancel"></span>     
                <?php endif;?>
            <?php else:?>
                <span class="bullet bullet-green">
            <?php endif;?>     
            <?php else: ?>
                <?php if($rec['pp']== 0): ?>
                <?php if(($rec['pdl']<> 0) AND ($rec['pd']<> 0) ): ?>
                <?php if($rec['pp']==0): ?>
                <?php if ($this->session->userdata('user_group')== $this->config->item('prod')): ?>
                <a href="<?php  echo site_url($this->config->item('job_pp_update').$this->session->userdata('user_group').'/'.$rec['id']); ?>"><span class="bullet bullet-red"></span></a>
                <?php else: ?>
                <span class="bullet bullet-red"></span>    
                <?php endif;?>
                <?php else:?>
                 <?php if ($this->session->userdata('user_group')== $this->config->item('prod')): ?>
                <a href="<?php  echo site_url($this->config->item('job_pp_cancel').$this->session->userdata('user_group').'/'.$rec['id']); ?>"><span class="bullet bullet-green"></span></a>
                <?php else: ?>
                <span class="bullet bullet-green"></span>    
                <?php endif;?>
                <?php endif; ?>
                <?php else:?>
                <span class="icon_single cancel"></span>     
                <?php endif;?>
            <?php else:?>
                <span class="bullet bullet-green">
            <?php endif;?>     
            <?php endif;?> 
            </td>
            
            <td>
                <?php if($rec['job_type']=="Training"):?>
                <?php if($rec['lk']== 0): ?>
                <?php if(($rec['pd']<> 0) AND ($rec['pp']<> 0) ): ?>
                <?php if($rec['btr']==0): ?>
                <?php if ($this->session->userdata('user_group')== $this->config->item('prod')): ?>
                <a href="<?php  echo site_url($this->config->item('job_btr_update').$this->session->userdata('user_group').'/'.$rec['id']); ?>"><span class="bullet bullet-red"></span></a>
                <?php else: ?>
                <span class="bullet bullet-red"></span>    
                <?php endif;?>
                <?php else:?>
                 <?php if ($this->session->userdata('user_group')== $this->config->item('prod')): ?>
                <a href="<?php  echo site_url($this->config->item('job_btr_cancel').$this->session->userdata('user_group').'/'.$rec['id']); ?>"><span class="bullet bullet-green"></span></a>
                <?php else: ?>
                <span class="bullet bullet-green"></span>    
                <?php endif;?>
                <?php endif; ?>
                <?php else:?>
                <span class="icon_single cancel"></span>     
                <?php endif;?>
            <?php else:?>
                <span class="bullet bullet-green">
            <?php endif;?>       
            <?php else: ?>
                 -
            <?php endif;?>
            </td>
            
            <td>
                <?php if($rec['job_type']=="Seminar"):?>
                <?php if($rec['ba_se']== 0): ?>
                <?php if(($rec['pd']<> 0) AND ($rec['pp']<> 0) ): ?>
                <?php if($rec['pms']==0): ?>
                <?php if ($this->session->userdata('user_group')== $this->config->item('prod')): ?>
                <a href="<?php  echo site_url($this->config->item('job_pms_update').$this->session->userdata('user_group').'/'.$rec['id']); ?>"><span class="bullet bullet-red"></span></a>
                <?php else: ?>
                <span class="bullet bullet-red"></span>    
                <?php endif;?>
                <?php else:?>
                <?php if ($this->session->userdata('user_group')== $this->config->item('prod')): ?>
                <a href="<?php  echo site_url($this->config->item('job_pms_cancel').$this->session->userdata('user_group').'/'.$rec['id']); ?>"><span class="bullet bullet-green"></span></a>
                <?php else: ?>
                <span class="bullet bullet-green"></span>    
                <?php endif;?>
                <?php endif; ?>
                <?php else:?>
                <span class="icon_single cancel"></span>     
                <?php endif;?>
             <?php else:?>
                <span class="bullet bullet-green">
            <?php endif;?>     
            <?php else: ?>
                <?php if($rec['ba_se']== 0): ?>
                <?php if(($rec['pp']<> 0) AND ($rec['btr']<> 0) ): ?>
                <?php if($rec['pms']==0): ?>
                <?php if ($this->session->userdata('user_group')== $this->config->item('prod')): ?>
                <a href="<?php  echo site_url($this->config->item('job_pms_update').$this->session->userdata('user_group').'/'.$rec['id']); ?>"><span class="bullet bullet-red"></span></a>
                <?php else: ?>
                <span class="bullet bullet-red"></span>    
                <?php endif;?>
                <?php else:?>
                <?php if ($this->session->userdata('user_group')== $this->config->item('prod')): ?>
                <a href="<?php  echo site_url($this->config->item('job_pms_cancel').$this->session->userdata('user_group').'/'.$rec['id']); ?>"><span class="bullet bullet-green"></span></a>
                <?php else: ?>
                <span class="bullet bullet-green"></span>    
                <?php endif;?>
                <?php endif; ?>
                <?php else:?>
                <span class="icon_single cancel"></span>     
                <?php endif;?>
             <?php else:?>
                <span class="bullet bullet-green">
            <?php endif;?>     
            <?php endif;?> 
            </td>
            
            <td>
                <?php if($rec['job_type']=="Training"):?>
                <?php if($rec['ba_tra']== 0): ?>
                <?php if(($rec['btr']<> 0) AND ($rec['pms']<> 0) ): ?>
                <?php if($rec['lk']==0): ?>
                <?php if ($this->session->userdata('user_group')== $this->config->item('prod')): ?>
                <a href="<?php  echo site_url($this->config->item('job_lk_update').$this->session->userdata('user_group').'/'.$rec['id']); ?>"><span class="bullet bullet-red"></span></a>
                <?php else: ?>
                <span class="bullet bullet-red"></span>    
                <?php endif;?>
                <?php else:?>
                <?php if ($this->session->userdata('user_group')== $this->config->item('prod')): ?>
                <a href="<?php  echo site_url($this->config->item('job_lk_cancel').$this->session->userdata('user_group').'/'.$rec['id']); ?>"><span class="bullet bullet-green"></span></a>
                <?php else: ?>
                <span class="bullet bullet-green"></span>    
                <?php endif;?>
                <?php endif; ?>
                <?php else:?>
                <span class="icon_single cancel"></span>     
                <?php endif;?>
            <?php else:?>
                <span class="bullet bullet-green">
            <?php endif;?>    
                 
            <?php else: ?>
                 -
            <?php endif;?>    
            </td>
            
            <td>
                <?php if($rec['job_type']=="Seminar"):?>
                <?php if($rec['lap']== 0): ?>
                <?php if(($rec['btr']<> 0) AND ($rec['pms']<> 0) ): ?>
                <?php if($rec['ba_se']==0): ?>
                <?php if ($this->session->userdata('user_group')== $this->config->item('prod')): ?>
                <a href="<?php  echo site_url($this->config->item('job_base_update').$this->session->userdata('user_group').'/'.$rec['id']); ?>"><span class="bullet bullet-red"></span></a>
                <?php else: ?>
                <span class="bullet bullet-red"></span>    
                <?php endif;?>
                <?php else:?>
                <?php if ($this->session->userdata('user_group')== $this->config->item('prod')): ?>
                <a href="<?php  echo site_url($this->config->item('job_base_cancel').$this->session->userdata('user_group').'/'.$rec['id']); ?>"><span class="bullet bullet-green"></span></a>
                <?php else: ?>
                <span class="bullet bullet-green"></span>    
                <?php endif;?>
                <?php endif; ?>
                <?php else:?>
                <span class="icon_single cancel"></span>     
                <?php endif;?>
             <?php else:?>
                <span class="bullet bullet-green">
            <?php endif;?>     
            <?php else: ?>
                 <?php if($rec['lap']== 0): ?>
                <?php if(($rec['pms']<> 0) AND ($rec['lk']<> 0) ): ?>
                <?php if($rec['ba_se']==0): ?>
                <?php if ($this->session->userdata('user_group')== $this->config->item('prod')): ?>
                <a href="<?php  echo site_url($this->config->item('job_base_update').$this->session->userdata('user_group').'/'.$rec['id']); ?>"><span class="bullet bullet-red"></span></a>
                <?php else: ?>
                <span class="bullet bullet-red"></span>    
                <?php endif;?>
                <?php else:?>
                <?php if ($this->session->userdata('user_group')== $this->config->item('prod')): ?>
                <a href="<?php  echo site_url($this->config->item('job_base_cancel').$this->session->userdata('user_group').'/'.$rec['id']); ?>"><span class="bullet bullet-green"></span></a>
                <?php else: ?>
                <span class="bullet bullet-green"></span>    
                <?php endif;?>
                <?php endif; ?>
                <?php else:?>
                <span class="icon_single cancel"></span>     
                <?php endif;?>
             <?php else:?>
                <span class="bullet bullet-green">
            <?php endif;?>     
            <?php endif;?> 
            </td>
            
            <td>
                <?php if($rec['job_type']=="Training"):?>
                <?php if($rec['llp']== 0): ?>
                <?php if(($rec['lk']<> 0) AND ($rec['ba_se']<> 0) ): ?>
                <?php if($rec['ba_tra']==0): ?>
                <?php if ($this->session->userdata('user_group')== $this->config->item('prod')): ?>
                <a href="<?php  echo site_url($this->config->item('job_batra_update').$this->session->userdata('user_group').'/'.$rec['id']); ?>"><span class="bullet bullet-red"></span></a>
                <?php else: ?>
                <span class="bullet bullet-red"></span>    
                <?php endif;?>
                <?php else:?>
                <?php if ($this->session->userdata('user_group')== $this->config->item('prod')): ?>
                <a href="<?php  echo site_url($this->config->item('job_batra_cancel').$this->session->userdata('user_group').'/'.$rec['id']); ?>"><span class="bullet bullet-green"></span></a>
                <?php else: ?>
                <span class="bullet bullet-green"></span>    
                <?php endif;?>
                <?php endif; ?>
                <?php else:?>
                <span class="icon_single cancel"></span>     
                <?php endif;?>
            <?php else:?>
                <span class="bullet bullet-green">
            <?php endif;?>      
            <?php else: ?>
                 -
            <?php endif;?>    
            </td>
            
            <td>
                <?php if($rec['job_type']=="Seminar"):?>
                <?php if($rec['ba2_se']== 0): ?>
                <?php if(($rec['lk']<> 0) AND ($rec['ba_se']<> 0) ): ?>
                <?php if($rec['lap']==0): ?>
                <?php if ($this->session->userdata('user_group')== $this->config->item('prod')): ?>
                <a href="<?php  echo site_url($this->config->item('job_lap_update').$this->session->userdata('user_group').'/'.$rec['id']); ?>"><span class="bullet bullet-red"></span></a>
               <?php else: ?>
                <span class="bullet bullet-red"></span>    
                <?php endif;?>
                <?php else:?>
                <?php if ($this->session->userdata('user_group')== $this->config->item('prod')): ?>
                <a href="<?php  echo site_url($this->config->item('job_lap_cancel').$this->session->userdata('user_group').'/'.$rec['id']); ?>"><span class="bullet bullet-green"></span></a>
                 <?php else: ?>
                <span class="bullet bullet-green"></span>    
                <?php endif;?>
                <?php endif; ?>
                <?php else:?>
                <span class="icon_single cancel"></span>     
                <?php endif;?>
            <?php else:?>
                <span class="bullet bullet-green">
            <?php endif;?>       
            <?php else: ?>
                 <?php if($rec['ba2_se']== 0): ?>
                <?php if(($rec['ba_tra']<> 0) AND ($rec['ba_se']<> 0) ): ?>
                <?php if($rec['lap']==0): ?>
                <?php if ($this->session->userdata('user_group')== $this->config->item('prod')): ?>
                <a href="<?php  echo site_url($this->config->item('job_lap_update').$this->session->userdata('user_group').'/'.$rec['id']); ?>"><span class="bullet bullet-red"></span></a>
               <?php else: ?>
                <span class="bullet bullet-red"></span>    
                <?php endif;?>
                <?php else:?>
                <?php if ($this->session->userdata('user_group')== $this->config->item('prod')): ?>
                <a href="<?php  echo site_url($this->config->item('job_lap_cancel').$this->session->userdata('user_group').'/'.$rec['id']); ?>"><span class="bullet bullet-green"></span></a>
                 <?php else: ?>
                <span class="bullet bullet-green"></span>    
                <?php endif;?>
                <?php endif; ?>
                <?php else:?>
                <span class="icon_single cancel"></span>     
                <?php endif;?>
            <?php else:?>
                <span class="bullet bullet-green">
            <?php endif;?>       
            <?php endif;?> 
            </td>
            
            
            <td>
                <?php if($rec['job_type']=="Training"):?>
                
                <?php if(($rec['ba_tra']<> 0) AND ($rec['lap']<> 0) ): ?>
                <?php if($rec['llp']==0): ?>
                <?php if ($this->session->userdata('user_group')== $this->config->item('prod')): ?>
                <a href="<?php  echo site_url($this->config->item('job_llp_update').$this->session->userdata('user_group').'/'.$rec['id']); ?>"><span class="bullet bullet-red"></span></a>
                <?php else: ?>
                <span class="bullet bullet-red"></span>    
                <?php endif;?>
                <?php else:?>
                 <?php if ($this->session->userdata('user_group')== $this->config->item('prod')): ?>
                <a href="<?php  echo site_url($this->config->item('job_llp_cancel').$this->session->userdata('user_group').'/'.$rec['id']); ?>"><span class="bullet bullet-green"></span></a>
                <?php else: ?>
                <span class="bullet bullet-green"></span>    
                <?php endif;?>
                <?php endif; ?>
                <?php else:?>
                <span class="icon_single cancel"></span>     
                <?php endif;?>
                 
            <?php else: ?>
                 -
            <?php endif;?>    
            </td>
            
            <td>
                <?php if($rec['job_type']=="Seminar"):?>
                <?php if(($rec['ba_tra']<> 0) AND ($rec['lap']<> 0) ): ?>
                <?php if($rec['ba2_se']==0): ?>
                <a href="<?php  echo site_url($this->config->item('job_ba2se_update').$this->session->userdata('user_group').'/'.$rec['id']); ?>"><span class="bullet bullet-red"></span></a>
                <?php else:?>
                <a href="<?php  echo site_url($this->config->item('job_ba2se_cancel').$this->session->userdata('user_group').'/'.$rec['id']); ?>"><span class="bullet bullet-green"></span></a>
                <?php endif; ?>
                <?php else:?>
                <span class="icon_single cancel"></span>     
                <?php endif;?>
            <?php else: ?>
                  <?php if(($rec['lap']<> 0) AND ($rec['llp']<> 0) ): ?>
                <?php if($rec['ba2_se']==0): ?>
                <a href="<?php  echo site_url($this->config->item('job_ba2se_update').$this->session->userdata('user_group').'/'.$rec['id']); ?>"><span class="bullet bullet-red"></span></a>
                <?php else:?>
                <a href="<?php  echo site_url($this->config->item('job_ba2se_cancel').$this->session->userdata('user_group').'/'.$rec['id']); ?>"><span class="bullet bullet-green"></span></a>
                <?php endif; ?>
                <?php else:?>
                <span class="icon_single cancel"></span>     
                <?php endif;?>
            <?php endif;?> 
            </td>
            
            <?php endif;?>
            
           <?php if(($title <> $this->lang->line('pb'))   ): ?>
			<td class="tc width20">
              <?php if($title<>$this->lang->line('app')): ?>
                <?php if(($this->session->userdata('user_pos')== $access) || ($this->session->userdata('user_group')== $this->config->item('admin')) || ($this->session->userdata('user_group')== $this->config->item('co_admin'))   ):?>
                 <?php if ($this->session->userdata('user_group')== $this->config->item('admin')): ?>
				    <a class="button white" href="<?php  echo site_url($this->config->item('job_delete').$rec['id']); ?>"><span class="icon_single cancel"></span></a>
				 <?php endif;?>
				<a class="button white" href="<?php  echo site_url($this->config->item('job_edit').$rec['id']); ?>"><span class="icon_single edit"></span></a>
                <?php endif;?>
                <a class="button white" href="<?php  echo site_url($this->config->item('forjob_excel').$rec['id'].'/'); ?>"><span class="icon_table xls"></span></a>
                <a class="button white" href="<?php  echo site_url($this->config->item('job_view').$rec['id']); ?>"><span class="icon_table video"></a>
              <?php else: ?>
                <?php if(($this->config->item('spv')== $this->session->userdata('user_pos')) && ($rec['mgr']==0) && ($rec['keu']==0)  ): ?>
                        <?php if($rec['spv']==0): ?>
                            <a class="button white" href="<?php  echo site_url($this->config->item('job_app_update').$this->session->userdata('user_pos').'/'.$rec['id']); ?>"><span class="bullet bullet-red"></span></a>
                        <?php else:?>
                            <a class="button white" href="<?php  echo site_url($this->config->item('job_app_cancel').$this->session->userdata('user_pos').'/'.$rec['id']); ?>"><span class="bullet bullet-green"></span></a>
                        <?php endif; ?>
                 <?php endif;?>
                 
                 <?php if(($this->config->item('mgr')== $this->session->userdata('user_pos')) && ($rec['spv']==1) && ($rec['keu']==0) ): ?>
                        <?php if($rec['mgr']==0): ?>
                            <a class="button white" href="<?php  echo site_url($this->config->item('job_app_update').$this->session->userdata('user_pos').'/'.$rec['id']); ?>"><span class="bullet bullet-red"></span></a>
                        <?php else:?>
                            <a class="button white" href="<?php  echo site_url($this->config->item('job_app_cancel').$this->session->userdata('user_pos').'/'.$rec['id']); ?>"><span class="bullet bullet-green"></span></a>
                        <?php endif; ?>
                 <?php endif;?>
                 
                 <?php if(($this->config->item('keu')== $this->session->userdata('user_pos')) && ($rec['spv']==1) && ($rec['mgr']==1) ): ?>
                        <?php if($rec['keu']==0): ?>
                            <a class="button white" href="<?php  echo site_url($this->config->item('job_app_update').$this->session->userdata('user_pos').'/'.$rec['id']); ?>"><span class="bullet bullet-red"></span></a>
                        <?php else:?>
                            <a class="button white" href="<?php  echo site_url($this->config->item('job_app_cancel').$this->session->userdata('user_pos').'/'.$rec['id']); ?>"><span class="bullet bullet-green"></span></a>
                        <?php endif; ?>
                 <?php endif;?>
                 
                 
              <?php endif;?>  
            </td>
			<?php endif;?>
		</tr>
        
      
        
	<?php endforeach;?>	
	</tbody>
	</table>
	<div class="clear"></div>
	</div>
	</div>
	
	</div>
	
	<?php if(($title==$this->lang->line('pb')) ): ?>
	<div class="column full fr">
	
		<div class="box themed_box">
			<h2 class="box-header-new"></h2>

			<h2 class="box-header"><?php echo $this->lang->line('desc'); ?></h2>
			<div class="box-content box-table">

		<table class="tablebox">
		<thead class="table-header">
		<tr>
			<th class="first tc">No</th>
			<th>Alias</th>
			<th>Description</th>
		</tr>
		</thead>
		<tbody>
			<tr class="odd">
				<td class=" first tc width10">1.</td>
				<td class="tc width10">JM</td>
				<td>JO+MOM</td>
			</tr>
            
            <tr class="even">
				<td class=" first tc width10">2.</td>
				<td class="tc width10">CD</td>
				<td>Corp.Diagnostic</td>
			</tr>
            
            <tr class="odd">
				<td class=" first tc width10">3.</td>
				<td class="tc width10">PTL</td>
				<td>Plot. Trainer + LF</td>
			</tr>
            
            <tr class="even">
				<td class=" first tc width10">4.</td>
				<td class="tc width10">CI</td>
				<td>Kirim Client Info</td>
			</tr>
            
            <tr class="odd">
				<td class=" first tc width10">5.</td>
				<td class="tc width10">KT</td>
				<td>Konfirmasi Teknis</td>
			</tr>
            
            <tr class="even">
				<td class=" first tc width10">6.</td>
				<td class="tc width10">PA</td>
				<td>Pengajuan Anggaran</td>
			</tr>
            
             <tr class="odd">
				<td class=" first tc width10">7.</td>
				<td class="tc width10">Person. Materi</td>
				<td>test.avi</td>
			</tr>
            
            <tr class="even">
				<td class=" first tc width10">8.</td>
				<td class="tc width10">PDJ</td>
				<td>Property dan DJ</td>
			</tr>
            
             <tr class="odd">
				<td class=" first tc width10">9.</td>
				<td class="tc width10">PD</td>
				<td>test.avi</td>
			</tr>
            
            <tr class="even">
				<td class=" first tc width10">10.</td>
				<td class="tc width10">PP</td>
				<td>Prapre Perlap</td>
			</tr>
            
             <tr class="odd">
				<td class=" first tc width10">11.</td>
				<td class="tc width10">BTR</td>
				<td>Basic Training Report</td>
			</tr>
            
            <tr class="even">
				<td class=" first tc width10">12.</td>
				<td class="tc width10">PMS</td>
				<td>Personalisasi Materi dan Slide</td>
			</tr>
            
             <tr class="odd">
				<td class=" first tc width10">13.</td>
				<td class="tc width10">LK</td>
				<td>Lap. Keu</td>
			</tr>
            
            <tr class="even">
				<td class=" first tc width10">14.</td>
				<td class="tc width10">BA1</td>
				<td>Berita Acara</td>
			</tr>
            
             <tr class="odd">
				<td class=" first tc width10">15.</td>
				<td class="tc width10">LLP</td>
				<td>Lap. List Peserta</td>
			</tr>
            
            <tr class="even">
				<td class=" first tc width10">16.</td>
				<td class="tc width10">BA2</td>
				<td>Berita Acara</td>
			</tr>
            			
			
		</tbody>
		</table>
		
		</div>
        
		</div>
	
	<div class="clear"></div>
	</div>
    <?php endif;?>
   